package com.liucxu.zimuzu.Model.Impl;

import com.liucxu.zimuzu.Api.ArticalService;
import com.liucxu.zimuzu.Model.Bean.ArticalBean;
import com.liucxu.zimuzu.Model.IArticalModel;
import com.liucxu.zimuzu.Utils.ParamsUtils;
import com.liucxu.zimuzu.Utils.ServiceFactory;

import java.util.HashMap;

import rx.Observable;

/**
 * 实现了资讯列表model接口的实现类
 * Created by liukanshan on 2016/12/30.
 */

public class ArticalModelImpl implements IArticalModel {
    @Override
    public Observable<ArticalBean> getArticals(String page) {
        HashMap<String, String> values = new HashMap<>();
        values = ParamsUtils.GetCommonParams();
        values.put("limit", "5");
        values.put("page", page);
        return ServiceFactory.GetInstance().createService(ArticalService.class).getArticals(values);
    }
}
